{include file=member.header.html}
<!-- 内容 -->
<div class="content f-cb">
	<!-- 当前位置 -->
	{include file=path.html}
	<!-- 内容左边栏 -->
	{include file=member.menu.html}
	<!-- 内容右边栏 -->
	<div class="con-shop-r">
		<dl class="promotion-index">
			<dt>限时促销设置</dt>
			<dd>
				<table width="100%" class="table-a">
					<tr>
						<td width="90"><a {if $activity_munber gt 0} href="{url app=my_promotion&act=add}"{else}href="javascript:void(0)"{/if} class="subbtnhs" id="J_h_btn">创建活动</a></td>
						<td width="200">您还可以创建 <i class="num" id="J_h_num">{$activity_munber}</i> 个限时促销活动</td>
						<td><i class="icon">&#xe686;</i> <a href="{jsurl app=article&act=view&article_id=132}" target="_blank" class="linkbtn">查看“限时促销”帮助</a></td>
					</tr>
				</table>
                <!--{if $activity_list}-->
				<table width="100%" class="table-b">
					<tr>
						<th width="140">活动名称</th>
						<th width="300">活动时间</th>
						<th width="150">活动时长</th>
						<th width="150">货品数量</th>
						<th width="150">活动状态</th>
						<th>操作</th>
					</tr>
                    <!--{foreach from=$activity_list item=activity}-->
					<tr>
						<td><p class="h-name">{$activity.act_name|escape}</p></td>
						<td>{$activity.start_time|date:Y.m.d H:i} - {$activity.end_time|date:Y.m.d H:i}</td>
						<td>{$activity.validity}小时</td>
						<td>{$activity.goods_quantity}</td>
						<td><!--{if $activity.act_status eq '未开始'}--><p>{$activity.act_status}</p><!--{elseif $activity.act_status eq '已开始'}--><p class="h-start">{$activity.act_status}</p><!--{else}--><p class="h-end">{$activity.act_status}</p><!--{/if}--></td>
						<td><a href="{url app=my_promotion&act=edit&act_id=$activity.act_id}" class="linkbtn">修改</a> <!--{if $activity.act_status neq '已开始'}--><a class="linkbtn" href="javascript:drop_confirm('您确定要删除它吗？', 'index.php?app=my_promotion&act=drop&act_id={$activity.act_id}');">删除</a><!--{/if}--></td>
					</tr>
                    <!--{/foreach}-->
				</table>
                <!--{/if}-->
			</dd>
		</dl>
	</div>
</div>
<script type="text/javascript">
	jQuery(function(){
		$('#J_h_btn').bind('click',function(){
			var num=parseInt($('#J_h_num').html());
			if(num ==0){
				$(this).removeAttr('href');
				wl.sConfirm({'info':'您创建的促销活动数量已达上限','cancel':true});
				return;
			}
		});
	});
</script>
<!-- 页脚 -->
{include file=footer.html}